package com.xbj.voa.common.shiroAndJwt;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author: 木火
 * @create: 2024-01-05
 * @description: 客户端提交的token不能直接传给shiro框架,需先封装成AuthenticationToken的对象
 **/
public class ShiroToken implements AuthenticationToken {
    private String token;

    public ShiroToken(String token){
        this.token = token;
    }
    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
